import { Component } from '@angular/core';
import "rxjs/Rx";
import {FormControl} from '@angular/forms';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  searchInput:FormControl = new FormControl();
  title= "kkk";
  constructor(){
    this.searchInput.valueChanges
      .debounceTime(1000)
      .subscribe(data=>{
      this.getDataInfo(data);
    })
  }
  getDataInfo(value:string){
    console.log(value);
  }
}
